<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<script>
    function codeChange(inputId1) {
        var inputValue = $.trim($("#" + inputId1).val());
        if (inputValue == 'A' || inputValue == 'B') {
            toastr.error('药品类价表是在药品管理系统中维护,请选择其他类别!');
            $('#' + inputId1).val('');
            $("#s2id_itemClass .select2-chosen").html('');
            return false;
        }
    }
</script>
<div class="content-wrap">
        <div class="wrapper" style="bottom: 50px;">
            <ul class="nav nav-tabs">
                <li>
                    <a href="#"  onclick="loadDiv('mainCenterDiv','${ctx}/oper/clinicItemDict/index')">诊疗项目列表</a>
                </li>
                <li class="active">
                    <a href="#" onclick="loadDiv('mainCenterDiv','${ctx}/oper/clinicItemDict/form')">
                        <c:choose>
                            <c:when test="${clinicItemDict.id==''|| clinicItemDict.id==null}">
                                诊疗项目添加
                            </c:when>
                            <c:otherwise>诊疗项目修改</c:otherwise>
                        </c:choose>

                    </a>
                </li>
            </ul>
            <section class="panel panel-default">
                <div class="panel-body">
                    <div class="col-lg-12">
                        <form:form id="inputForm" data-parsley-validate="" modelAttribute="clinicItemDict" onsubmit="return formSaveLoad('mainCenterDiv','inputForm','${ctx}/oper/clinicItemDict/save','${ctx}/oper/clinicItemDict/index');" method="post" class="form-horizontal">
                            <form:hidden path="id"/>
                            <form:hidden path="orgId"/>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">诊疗项目分类：</label>
                                    <div class="col-sm-4">
                                        <form:select path="itemClass" id="itemClass" class="form-control" data-parsley-required="true" onchange="return codeChange('itemClass','')">
                                            <form:option value="" label=""/>
                                            <form:options items="${fns:getDictList('BILL_ITEM_CLASS_DICT')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
                                        </form:select>
                                    </div>
                                </div>
                                <%--<div class="form-group">--%>
                                    <%--<label class="col-sm-2 control-label">诊疗项目代码：</label>--%>
                                    <%--<div class="col-sm-4">--%>
                                        <%--<form:input path="itemCode" htmlEscape="false" class="form-control"  maxlength="50" data-parsley-required="true"/>--%>
                                    <%--</div>--%>
                                <%--</div>--%>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">诊疗项目名称：</label>
                                    <div class="col-sm-4">
                                        <form:input path="itemName" htmlEscape="false" class="form-control"  maxlength="200" data-parsley-required="true"/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">执行科室：</label>
                                    <div class="col-sm-4">
                                        <%--<form:input path="performedBy" htmlEscape="false" class="form-control"  maxlength="100" />--%>
                                        <sys:treeselect selectedParent="true" id="performedBy"  name="orgDept.id" value="${clinicItemDict.orgDept.id}"  update="${not empty orgDept.id}" labelName="${clinicItemDict.orgDept.deptName}" labelValue="${clinicItemDict.orgDept.deptName}"
                                                        title="科室" url="/sys/orgDept/treeData" isnull="false" extId="${orgDept.id}" cssClass="form-control" />
                                    </div>
                                </div>
                                <%--<div class="form-group">
                                    <label class="col-sm-2 control-label">扩展字段1：</label>
                                    <div class="col-sm-4">
                                        <form:input path="expand1" htmlEscape="false" class="form-control"  maxlength="500" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">扩展字段2：</label>
                                    <div class="col-sm-4">
                                        <form:input path="expand2" htmlEscape="false" class="form-control"  maxlength="500" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">扩展字段3：</label>
                                    <div class="col-sm-4">
                                        <form:input path="expand3" htmlEscape="false" class="form-control"  maxlength="500" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">扩展字段4：</label>
                                    <div class="col-sm-4">
                                        <form:input path="expand4" htmlEscape="false" class="form-control"  maxlength="500" />
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">扩展字段5：</label>
                                    <div class="col-sm-4">
                                        <form:input path="expand5" htmlEscape="false" class="form-control"  maxlength="500" />
                                    </div>
                                </div>--%>
                                <div class="form-group">
                                    <label class="col-sm-2 control-label">备注信息：</label>
                                    <div class="col-sm-4">
                                        <form:textarea path="remarks" htmlEscape="false" rows="3" maxlength="200" class="form-control"/>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-sm-offset-2 col-sm-10">
                                        <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存">&nbsp;
                                        <input id="btnCancel" class="btn" type="button" value="返 回" onclick="loadDiv('mainCenterDiv','${ctx}/oper/clinicItemDict/index')">
                                </div>
                            </div>
                        </form:form>
                    </div>

                </div>
            </section>
        </div>
    </div>